#define _CRT_SECURE_NO_WARNINGS 1
#include"vector.h"

void test1()
{
	vt::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(5);

	for (auto a : v1)
	{
		cout << a << ' ';
		a++;
	}
	cout << endl;
}

void test2()
{
	vt::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(5);

	vt::vector<int> v2(v1);
	for (auto a : v2)
	{
		cout << a << ' ';
		a++;
	}
	cout << endl;

	vt::vector<int> v3(10,1);

	for (auto a : v3)
	{
		cout << a << ' ';
		a++;
	}
	cout << endl;
}

void test3()
{
	vt::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(5);

	vt::vector<int> v2;

	v2 = v1;
	for (auto a : v2)
	{
		cout << a << ' ';
		a++;
	}
	cout << endl;
}

void test4()
{
	vt::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(5);

	vt::vector<int> v2(v1.begin(), v1.end());
	for (auto a : v2)
	{
		cout << a << ' ';
		a++;
	}
	cout << endl;
}

void test5()
{
	vt::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(5);

	vt::vector<int>::reverse_iterator rit = v1.rbegin();
	while (rit != v1.rend())
	{
		cout << *rit << " ";
		++rit;
	}
	cout << endl;

}
int main()
{
	test5();
	return 0;
}